<div class="goods">
  <!-- 按钮 -->
  <el-button plain type="success" @click="$router.push('/goods-add')">添加商品</el-button>
  <!-- 表格部分 -->
  <el-table
    :data="goodsList"
    stripe
    style="width: 100%">
    <!-- 添加自定义索引 -->
    <el-table-column type="index">
    </el-table-column>

    <el-table-column
      prop="goods_name"
      label="商品名称"
      width="180">
    </el-table-column>
    <el-table-column
      prop="goods_price"
      label="商品价格"
      width="180">
    </el-table-column>
    <el-table-column
      prop="goods_weight"
      label="商品重量">
    </el-table-column>
    <el-table-column
      prop="add_time"
      label="创建时间">
    </el-table-column>
    <el-table-column
      label="操作">
      <template slot-scope="scope">
        <el-button size="mini" plain type="primary" icon="el-icon-edit"></el-button>
        <el-button size="mini" plain type="danger" icon="el-icon-delete"></el-button>
      </template>
    </el-table-column>
  </el-table>
  <!-- 分页 -->
  <el-pagination
    @current-change='currentChange'
    background
    layout="prev, pager, next"
    :total="total">
  </el-pagination>
</div>
